using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Pervote.Core;
using Pervote.Core.Logic;

public partial class Dev_CategoryCreator : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        CategoryManager mgr = new CategoryManager();
        Category cat = new Category();
        cat.Name = nameTextBox.Text;        
        cat.Description = catTextBox.Text;
        cat.CreatedBy = "DefaultUser";
        cat.ParentId = long.Parse(parentIdTextBox.Text);
        mgr.CreateCategory(cat, new ErrorInfo());
    }
}
